<extend name="Public/base"/>
<!--extend name="./Application/Common/View/base/common.html"/-->
<block name="body">
<style>
       .nav-tabs > li > a {
         padding:5px 20px;
        }
        .nav-tabs {
           padding:0px 0px 0px 20px;
        }
		.nav-tabs > li > a {
           line-height:18px;
        }
		.tab-pane{padding-top:30px}
</style>
				 <ul class="nav nav-tabs" id="myTab"> 
                    <li class="active"><a href="#home">基本资料</a></li> 
                    <li><a href="#profile">扩展资料</a></li> 
                    <li><a href="#messages">修改头像</a></li> 
                    <li><a href="#settings">修改密码</a></li> 
                 </ul> 
        
                 <div class="tab-content"> 
                    <div class="tab-pane active" id="home">
					<!---------------------------------------------------------------->
					<div class="row center_panel" id="base_panel" style="margin:0px 20px 20px 20px">
                <div class="col-md-8">
                    <form class="form-horizontal center_info ajax-form" role="form" action="{:U('Usercenter/Config/index')}" method="post">
                        <div class="form-group">
                            <label for="nickname" class="col-sm-3 control-label">昵称</label>

                            <div class="col-sm-9">
                                <input type="text" class="form-control" id="nickname" name="nickname" value="{$user.nickname|op_t}"
                                       placeholder="昵称">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">性别</label>

                            <div class="col-sm-9">
                                <label class="radio-inline">
                                    <input name="sex" type="radio" value="1"
                                    <eq name="user.sex" value="1"> checked</eq>
                                    > 男
                                </label>
                                <label class="radio-inline">
                                    <input name="sex" type="radio" value="2"
                                    <eq name="user.sex" value="2"> checked</eq>
                                    > 女
                                </label>
                                <label class="radio-inline">
                                    <input name="sex" type="radio" value="0"
                                    <eq name="user.sex" value="0"> checked</eq>
                                    > 保密
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="email" class="col-sm-3 control-label">邮箱</label>
                            <div class="col-sm-9">
                                <input type="email" class="form-control" id="email" placeholder="邮箱" name="email"
                                       value="{$user.email|htmlspecialchars}">
                            </div>
                        </div>


                        <div class="form-group position">
                            <label for="email" class="col-sm-3 control-label">所在地</label>

                            <div class="col-sm-9">
                                {:hook('J_China_City',array('province'=>$user['pos_province'],'city'=>$user['pos_city'],'district'=>$user['pos_district'],'community'=>$user['pos_community']))}
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="signature" class="col-sm-3 control-label">个性签名</label>

                            <div class="col-sm-9">
                                <textarea id="signature" name="signature" class="form-control"
                                          style="width: 100%; height: 6em;resize: none">{$user.signature|htmlspecialchars}</textarea>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-9">
                                <button type="submit" class="btn btn-primary">&nbsp;保存&nbsp;</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
					<!---------------------------------------------------------------->
					</div> 
                    <div class="tab-pane" id="profile">
					<!---------------------------------------------------------------->
					<div id="expand_panel" class="center_panel" style="margin:0px 20px 20px 20px">
                <ul class="nav nav-pills ucenter_tab">
                    <volist name="profile_group_list" id="vl">
                        <li
                        <eq name="vl.id" value="$profile_group_id">class="active"</eq>
                        ><a onclick="$('#expandinfo_list').load($(this).attr('url'));$('.ucenter_tab li').removeClass('active');$(this).parent().addClass('active');"
                            url="{:U('UserCenter/Config/showExpandInfo',array('profile_group_id'=>$vl['id'],'uid'=>$uid))}">{$vl.profile_name}</a></li>
                    </volist>
                </ul>
                <div class="row">
                    <div class="col-md-12">
                        <div id="expandinfo_list" class="row expandinfo-list">
                            <include file="Config/expandinfo"/>
                        </div>
                    </div>
                </div>

            </div>
					<!---------------------------------------------------------------->
					</div> 
                    <div class="tab-pane" id="messages">
					<!---------------------------------------------------------------->
					            <div id="avatar_panel" class="center_panel" style="margin:20px">
                <include file="Config/changeavatar"/>
            </div>
					<!---------------------------------------------------------------->
					</div> 
                    <div class="tab-pane" id="settings">
					<!---------------------------------------------------------------->
					    <div id="password_panel" class="center_panel" style="margin:20px">
                <include file="Config/changepassword"/>
            </div>
					<!---------------------------------------------------------------->
					</div> 
                 </div> 
       
    <script> 
      $(function () { 
        //$('#myTab a:last').tab('show');//初始化显示哪个tab 
      
        $('#myTab a').click(function (e) { 
          e.preventDefault();//阻止a链接的跳转行为 
          $(this).tab('show');//显示当前选中的链接及关联的content 
        }) 
      }) 
    </script>
    <div id="center">


        {:hook('userConfig')}


    </div>
<neq name="tab" value="">
    <script>
        $(function () {

            center_toggle("{$tab}");
        })
    </script>
</neq>

</block>